<?php

namespace App\Http\Controllers\admin;

use App\Dao\WidthwalDao;
use App\Services\Code;

class WidthwalsController extends BaseController
{
    public function widthwals()
    {
        if(getIsHasPage()){
            return  Code::message('',200,WidthwalDao::pageinate(request()->all()));
        }
        return view('admin.widthwals.widthwals');
    }


    public function edit()
    {
        if(isPost()){
            $params = request()->all();
            WidthwalDao::edit($params);
            return  Code::message();
        }
        return view('admin.widthwals.edit',[
            'info'=>WidthwalDao::info(request()->all())
        ]);
    }
}
